package com.jrx.anytxn.transaction.controller.api;


import com.jrx.anytxn.i18n.response.TxnRespResult;
import com.jrx.anytxn.transaction.dto.common.SendSmsReq;
import com.jrx.anytxn.transaction.service.ISmsService;
import io.swagger.annotations.Api;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * ClassName SendSmsController
 *
 * @author zebin.zhang
 * @version 1.0
 * @description 其他模块通过feign调用发送短信
 * @date 2022-02-23
 **/
@Api(tags = "短信发送相关接口")
@RestController
@RequestMapping(value = "/api/transaction/sendSms")
public class SendSmsController {
    private static final Logger logger = LoggerFactory.getLogger(ActivityLoanController.class);

    @Autowired
    private ISmsService smsService;

    @PostMapping(value = "/sendSms")
    public TxnRespResult sendSms(@Valid @RequestBody SendSmsReq req) throws Exception {
        smsService.sendSmsMq(req);
        return null;
    }
}
